package edu.sctu.jarime.june.day20150614.TxtChar;

import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;

/**
 * Created by user19 on 2015/6/14.
 */
public class CharUtil {
    public void Txt_char()throws  Exception{


        File file = new File("D:\\lili\\123456.txt");
        File file1 = new File("D:\\lili\\123456778.txt");

        FileReader fileReader = new FileReader(file);
        FileWriter fileWriter = new FileWriter(file1);


        int ch;
        char[] cha=new char[1024];
        while ((ch=fileReader.read(cha))!=-1){

            new String(cha);

            System.out.println(cha);
            fileWriter.write(cha,0,ch);
        }

        fileReader.close();
        fileWriter.close();
    }
}
